home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / ole2book.zip / CHAP06.ZIP / CHAP06 / EDATAOBJ / DDATAOBJ.H < prev    next >
C/C++ Source or Header  |  1993-03-26  |  1KB  |  53 lines

  1. /*
  2.  * DDATAOBJ.H
  3.  *
  4.  * Definitions, classes, and prototypes for a DLL that provides Data objects.
  5.  *
  6.  * Copyright (c)1993 Microsoft Corporation, All Rights Reserved
  7.  *
  8.  * Kraig Brockschmidt, Software Design Engineer
  9.  * Microsoft Systems Developer Relations
  10.  *
  11.  * Internet  :  kraigb@microsoft.com
  12.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  13.  */
  14.  
  15.  
  16. #ifndef _DDATAOBJ_H_
  17. #define _DDATAOBJ_H_
  18.  
  19.  
  20. #include "dataobj.h"
  21.  
  22.  
  23. void FAR PASCAL ObjectDestroyed(void);
  24.  
  25.  
  26. //DDATAOBJ.CPP
  27. //This class factory object creates Data Objects.
  28.  
  29. class __far CDataObjectClassFactory : public IClassFactory
  30.     {
  31.     protected:
  32.         ULONG           m_cRef;         //Reference count on class object
  33.         UINT            m_iSize;        //Data size for this class.
  34.  
  35.     public:
  36.         CDataObjectClassFactory(UINT);
  37.         ~CDataObjectClassFactory(void);
  38.  
  39.         //IUnknown members
  40.         STDMETHODIMP         QueryInterface(REFIID, LPVOID FAR *);
  41.         STDMETHODIMP_(ULONG) AddRef(void);
  42.         STDMETHODIMP_(ULONG) Release(void);
  43.  
  44.         //IClassFactory members
  45.         STDMETHODIMP         CreateInstance(LPUNKNOWN, REFIID, LPVOID FAR *);
  46.         STDMETHODIMP         LockServer(BOOL);
  47.     };
  48.  
  49. typedef CDataObjectClassFactory FAR * LPCDataObjectClassFactory;
  50.  
  51.  
  52. #endif //_DDATAOBJ_H_
  53.